<?php

namespace App\Console\Commands;

use App\Models\StatisticPhoneRecord;
use App\Models\StatisticSmsRecord;
use Illuminate\Console\Command;
use Exception;

class StatisticsPhoneRecord extends Command
{
    //执行命令
    protected $signature = 'console:statistic-phone-record';

    //执行描述
    protected $description = '统计客服回访记录';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    //执行动作
    public function handle(StatisticPhoneRecord $phoneRecord, StatisticSmsRecord $smsRecord)
    {
        try {

            $phoneRecord->count();

            $smsRecord->count();
           
        } catch (Exception $e) {

            throw new Exception($e->getMessage());
        }
    }
}
